/**
 * Witontek.com.
 * Copyright (c) 2012-2017 All Rights Reserved.
 */
package test.string;

import java.io.UnsupportedEncodingException;

/**
 * 
 * @author Long
 * @version $Id: StringGBK.java, v 0.1 2017年2月6日 上午9:56:18  xiaolong.ma  Exp $
 */
public class StringGBK {

    /**
     * 
     * @param args
     * @throws UnsupportedEncodingException 
     */
    public static void main(String[] args) throws UnsupportedEncodingException {
        String t = "这是一个字符串aaa111";
        String utf8 = new String(t.getBytes("UTF-8"));
        System.out.println(utf8);
        String unicode = new String(utf8.getBytes(), "UTF-8");
        System.out.println(unicode);
        String gbk = new String(unicode.getBytes("GBK"));
        System.out.println(gbk);
    }

}
